<?xml version="1.0" encoding="UTF-8" ?>

<!--

    Copyright (c) 1997, 2018 Oracle and/or its affiliates.
    Copyright (c) 2018 Payara Services Limited. 
    All rights reserved.
    
    This program and the accompanying materials are made available under the
    terms of the Eclipse Public License v. 2.0, which is available at
    http://www.eclipse.org/legal/epl-2.0.

    This Source Code may also be made available under the following Secondary
    Licenses when the conditions for such availability set forth in the
    Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
    version 2 with the GNU Classpath Exception, which is available at
    https://www.gnu.org/software/classpath/license.html.

    SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0

-->

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
    xmlns:ui="http://xmlns.jcp.org/jsf/facelets">

<head>
<title>subview01</title>
</head>

<body>

    <p>Correct nesting order of ResourceBundles</p>

    <pre>
        <code>

viewRoot

  BundleA

  output01

  BundleB

  output02

  subview id=inner02

    Bundle C

    output03

  output04

  subview id=outer01

    BundleD

    output05

  subview id=outer02

    BundleE

    output06

  button


</code>
</pre>
        <f:loadBundle var="bundle" basename="com.sun.faces.test.servlet30.nestedloadbundles.BundleA" />
    
        <f:view>
    
            <p>
                Output 01 from bundle:
                <h:outputText id="outputO1" value="#{bundle.okLabel}" />
            </p>
    
            <h:outputText value="Begin test ui:include with subview tag in imported page" />
    
            <p>
                <ui:include src="foo01.xhtml" />
            </p>
    
            <p>
                <h:outputText value="subview01" />
            </p>
    
            <p>
                <ui:include src="bar01.xhtml" />
            </p>
    
            <p>
                <h:outputText value="End test ui:include with subview tag in imported page" />
            </p>
    
            <p>
                Output 04 from bundle:
                <h:outputText id="output04" value="#{bundle.okLabel}" />
            </p>
    
            <p>
                <h:outputText value="Begin test ui:include with subview tag in importing page" />
            </p>
    
            <p>
                <f:subview id="outer01">
                    <ui:include src="foo02.xhtml" />
                </f:subview>
            </p>
    
    
            <p>
                <h:outputText value="subview02" />
            </p>
    
            <p>
                <f:subview id="outer02">
                    <ui:include src="bar02.xhtml" />
                </f:subview>
            </p>
    
            <p>
                <h:outputText value="End test ui:include with subview tag in importing page" />
            </p>
    
            <h:form prependId="false">
    
                <p>
                    Reload:
                    <h:commandButton id="button" value="#{bundle.okLabel}" />
                </p>
    
            </h:form>
    
        </f:view>
    
    </body>
</html>